--自愈能力
local ziyunengli = fk.CreateSkill {
    name = "mcdh_ziyunengli"
}

ziyunengli:addEffect(fk.EnterDying,{
    can_trigger = function (self, event, target, player, data)
        return player:hasSkill(self) and player:isWounded() and not player:isNude() and player:inMyAttackRange(target)
    end,
    on_cost = function (self, event, target, player, data)
        local room = player.room
        local cards = room:askForDiscard(player, 1, 1, true, self.name, true, ".","#mcdh_ziyunengli_askfor", true)
        if #cards > 0 then
            self.cost_data = cards
            return true
        end
    end,
    on_use = function (self, event, target, player, data)
        local room = player.room
        room:throwCard(self.cost_data, self.name, player, player)
        if player:isAlive() and player:isWounded() then
            room:recover({
                who = player,
                num = 1,
                recoverBy = player,
                skillName = self.name
            })
        end
    end
})

Fk:loadTranslationTable{
    ["mcdh_ziyunengli"] = "自愈",
    [":mcdh_ziyunengli"] = "『自愈能力』<br>你攻击范围内的角色进入濒死状态时，你可以弃置一张牌，回复1点体力。",
    ["@mcdh_sheshentuji_ban"] = "舍身突击",
    ["#mcdh_ziyunengli_askfor"] = "自愈能力：弃置一张牌，你回复1点体力。",
}
return ziyunengli